const indexRoute = require('./indexRoute');

const views = require('koa-views');
const staticSource = require('koa-static');

function registerApp(app) {
    app.use(staticSource(__dirname + '/../static'));
    app.use(views(__dirname + '/../static/hbs', {
        default: 'hbs',
        map: { hbs: 'handlebars' }
    }));
    indexRoute(app);
}

module.exports = registerApp;